package edu.caece.langprocessor.syntax.parse;

import java.util.Map;
import java.util.Stack;

import edu.caece.langprocessor.lexical.LexicalProcessor;
import edu.caece.langprocessor.syntax.ProductionFactory;
import edu.caece.langprocessor.syntax.Terminal;
import edu.caece.langprocessor.syntax.tree.Tree;

public abstract class Action {

	protected ActionType type;
	protected Integer value;

	public ActionType getType() {
		return this.type;
	}

	public Integer getValue() {
		return this.value;
	}

	public abstract ActionResult run(LexicalProcessor lexicalProcessor,
			Map<Integer, ProductionFactory> productions,
			GotoActionsTable gotoActionsTable,
			Stack<ParseStackItem> parseStack, Terminal terminalItem, 
			Tree parseTree) ;

	@Override
	public String toString() {
		return this.type.toString() + " " + this.value.toString();
	}

}
